﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Net;

namespace CometeTeste
{
    class LoginWindowsServices : SvcLoginWindows.LoginWindows
    {
        public bool EnforceWinAutho { get; set; }
        protected override WebRequest GetWebRequest(Uri uri)
        {
            WebRequest reqst = base.GetWebRequest(uri);
            //return base.GetWebRequest(uri);
            if (this.EnforceWinAutho)
            {
                //chaine de conexion de winlog
                reqst.Headers.Add("X-FORMS_BASED_AUTH_ACCEPTED", "f");
            }
            return reqst;
        }

    }
}
